package com.mk.model.bill;

import com.mk.model.BaseModel;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
public class Bill extends BaseModel {

    /**
     * id
     */
    private int id;

    /**
     * 金额
     */
    @NotNull(message = "金额输入错误")
    @Min(value = 0,message = "金额过小")
    @Max(value = 20000,message = "金额超过最大限制")
    private BigDecimal amount;

    /**
     * 收支 true收入 false支出
     */
    private boolean inCome;

    /**
     * 用途或来源描述
     */
    @NotEmpty(message = "请检查账单用途或描述")
    private String remark;



}
